home *** CD-ROM | disk | FTP | other *** search
- /*
- IE_Errors.h
-
- This file contains the error strings and the error routine
- used by the Main file generated by the C.generator.
-
- You can modify the strings and the Error routine as you like.
-
- NOTE: the Error routine MUST receive two STRPTR as arguments.
- */
-
- STRPTR ErrStrings[] = {
- "Couldn't open ",
- "Couldn't open a diskfont!",
- "Setup Screen Error: ",
- "Couldn't open the screen!",
- "Couldn't get Visual Info!",
- "Open Window Error: ",
- "Couldn't create a context!",
- "Couldn't create a gadget!",
- "Couldn't create a menu!",
- "Couldn't open the window!"
- };
-
- #define OPEN_LIB 0
- #define OPEN_FONTS 1
- #define SETUP_SCR 2
- #define OPEN_WND SETUP_SCR+3
-
- void Error(STRPTR str, STRPTR str2)
- {
- TEXT c[ 256 ] = "";
-
- sprintf( c, "%s %s", str, str2 );
-
- if( WBMsg ) { // this requires the 'Workbench' checkbox to be checked
-
- fprintf( stderr, "\n%s\n", c );
-
- } else {
-
- struct IntuiText error_text = {
- 0, 0, JAM1, 0, 10, NULL, c, NULL };
-
- static struct IntuiText ok_text = {
- 0, 0, JAM1, 0, 0, NULL, "OK", NULL };
-
- if( IntuitionBase )
- AutoRequest( NULL, &error_text, NULL, &ok_text, 0, 0, 0, 0 );
- }
-
- End( RETURN_FAIL );
- }
-